.class public Lcom/nemustech/regina/ElementReginaWidget$Gadget;
.super Ljava/lang/Object;
.source "ElementReginaWidget.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/ElementReginaWidget;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "Gadget"
.end annotation


# static fields
.field public static final GADGET_TYPE_MORPH:I = 0x5

.field public static final GADGET_TYPE_NEXT:I = 0x4

.field public static final GADGET_TYPE_NONE:I = 0x0

.field public static final GADGET_TYPE_PREV:I = 0x3

.field public static final GADGET_TYPE_RUNNABLE:I = 0x1

.field public static final GADGET_TYPE_RUN_ON_UI_THREAD:I = 0x6

.field public static final GADGET_TYPE_START_ACTIVITY:I = 0x2

.field public static final GADGET_TYPE_USER_DEF:I = 0x7


# instance fields
.field private mActor:Ljava/lang/Runnable;

.field private mGadgetType:I

.field private mIntent:Landroid/content/Intent;

.field private mOriginBitmap:Landroid/graphics/Bitmap;

.field private mTagHash:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private mTouchedArea:Landroid/graphics/Rect;

.field private mTouchedIconArea:Landroid/graphics/Rect;

.field final synthetic this$0:Lcom/nemustech/regina/ElementReginaWidget;


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;IILandroid/graphics/Rect;Landroid/graphics/Bitmap;)V
    .locals 3
    .parameter
    .parameter "gedgetImageLeft"
    .parameter "gadgetImageTop"
    .parameter "touchedIconArea"
    .parameter "gadgetImage"

    .prologue
    .line 471
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 472
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    .line 473
    .local v0, area:Landroid/graphics/Rect;
    if-nez p4, :cond_0

    .line 474
    iget-object v1, p1, Lcom/nemustech/regina/ElementReginaWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f060043

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v1

    sub-int v1, p2, v1

    iput v1, v0, Landroid/graphics/Rect;->left:I

    .line 475
    iput p3, v0, Landroid/graphics/Rect;->top:I

    .line 476
    invoke-virtual {p5}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    add-int/2addr v1, p2

    iput v1, v0, Landroid/graphics/Rect;->right:I

    .line 477
    invoke-virtual {p5}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    add-int/2addr v1, p3

    iput v1, v0, Landroid/graphics/Rect;->bottom:I

    .line 482
    :goto_0
    invoke-direct {p0, v0, p4}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->createGadget(Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 483
    return-void

    .line 479
    :cond_0
    invoke-virtual {v0, p4}, Landroid/graphics/Rect;->set(Landroid/graphics/Rect;)V

    goto :goto_0
.end method

.method public constructor <init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V
    .locals 0
    .parameter
    .parameter "touchedArea"
    .parameter "touchedIconArea"

    .prologue
    .line 485
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 486
    invoke-direct {p0, p2, p3}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->createGadget(Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 487
    return-void
.end method

.method private createGadget(Landroid/graphics/Rect;Landroid/graphics/Rect;)V
    .locals 0
    .parameter "area"
    .parameter "touchedIconArea"

    .prologue
    .line 509
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    .line 510
    iput-object p2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedIconArea:Landroid/graphics/Rect;

    .line 511
    return-void
.end method


# virtual methods
.method public contains(II)Z
    .locals 1
    .parameter "x"
    .parameter "y"

    .prologue
    .line 532
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    invoke-virtual {v0, p1, p2}, Landroid/graphics/Rect;->contains(II)Z

    move-result v0

    return v0
.end method

.method public getGadgetType()I
    .locals 1

    .prologue
    .line 575
    iget v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mGadgetType:I

    return v0
.end method

.method public getIntent()Landroid/content/Intent;
    .locals 1

    .prologue
    .line 522
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    return-object v0
.end method

.method public getTag(Ljava/lang/String;)Ljava/lang/Object;
    .locals 1
    .parameter "key"

    .prologue
    .line 497
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTagHash:Ljava/util/HashMap;

    if-nez v0, :cond_0

    .line 498
    const/4 v0, 0x0

    .line 501
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTagHash:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0
.end method

.method public getTouchedArea()Landroid/graphics/Rect;
    .locals 1

    .prologue
    .line 554
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    return-object v0
.end method

.method public hideClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;)V
    .locals 1
    .parameter "highLightPanel"

    .prologue
    .line 678
    if-eqz p1, :cond_0

    .line 679
    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 680
    :cond_0
    return-void
.end method

.method public putTag(Ljava/lang/String;Ljava/lang/Object;)V
    .locals 1
    .parameter "key"
    .parameter "value"

    .prologue
    .line 490
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTagHash:Ljava/util/HashMap;

    if-nez v0, :cond_0

    .line 491
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTagHash:Ljava/util/HashMap;

    .line 493
    :cond_0
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTagHash:Ljava/util/HashMap;

    invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 494
    return-void
.end method

.method public runActorByGadget()V
    .locals 3

    .prologue
    .line 536
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mActor:Ljava/lang/Runnable;

    if-eqz v1, :cond_0

    .line 537
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mActor:Ljava/lang/Runnable;

    invoke-interface {v1}, Ljava/lang/Runnable;->run()V

    .line 542
    :goto_0
    return-void

    .line 539
    :cond_0
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f070007

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 540
    .local v0, msg:Ljava/lang/String;
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    goto :goto_0
.end method

.method public runActorOnUIThreadByGadget()V
    .locals 3

    .prologue
    .line 545
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mActor:Ljava/lang/Runnable;

    if-eqz v1, :cond_0

    .line 546
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    check-cast v1, Lcom/nemustech/regina/ReginaLauncher;

    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mActor:Ljava/lang/Runnable;

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ReginaLauncher;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 551
    :goto_0
    return-void

    .line 548
    :cond_0
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f070007

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 549
    .local v0, msg:Ljava/lang/String;
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    goto :goto_0
.end method

.method public sendBroadcastByGadget()V
    .locals 2

    .prologue
    .line 569
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    if-eqz v0, :cond_0

    .line 570
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    invoke-virtual {v0, v1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    .line 572
    :cond_0
    return-void
.end method

.method public setActor(Ljava/lang/Runnable;)V
    .locals 0
    .parameter "actor"

    .prologue
    .line 514
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mActor:Ljava/lang/Runnable;

    .line 515
    return-void
.end method

.method public setGadgetType(I)V
    .locals 0
    .parameter "gadgetType"

    .prologue
    .line 579
    iput p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mGadgetType:I

    .line 580
    return-void
.end method

.method public setIntent(Landroid/content/Intent;)V
    .locals 0
    .parameter "intent"

    .prologue
    .line 518
    iput-object p1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    .line 519
    return-void
.end method

.method public showClickedGadget(ILcom/nemustech/tiffany/world/TFPanel;ILandroid/graphics/Bitmap;)V
    .locals 7
    .parameter "faceIndex"
    .parameter "panel"
    .parameter "clickedColor"
    .parameter "clickedBitmap"

    .prologue
    const/4 v5, 0x0

    const/4 v6, 0x0

    .line 583
    invoke-virtual {p2, p1}, Lcom/nemustech/tiffany/world/TFPanel;->getFaceImage(I)Landroid/graphics/Bitmap;

    move-result-object v2

    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;

    move-result-object v2

    iput-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    .line 585
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v3

    sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v2, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 587
    .local v0, clickedPanelBitmap:Landroid/graphics/Bitmap;
    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 588
    .local v1, clickedPanelCanvas:Landroid/graphics/Canvas;
    invoke-virtual {p2, p1}, Lcom/nemustech/tiffany/world/TFPanel;->getFaceImage(I)Landroid/graphics/Bitmap;

    move-result-object v2

    invoke-virtual {v1, v2, v5, v5, v6}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 590
    if-eqz p3, :cond_0

    .line 591
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v2, v2, Landroid/graphics/Rect;->left:I

    add-int/lit8 v2, v2, 0x5

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v3, v3, Landroid/graphics/Rect;->top:I

    iget-object v4, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v4, v4, Landroid/graphics/Rect;->right:I

    const/4 v5, 0x5

    sub-int/2addr v4, v5

    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v5, v5, Landroid/graphics/Rect;->bottom:I

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/graphics/Canvas;->clipRect(IIII)Z

    .line 592
    sget-object v2, Landroid/graphics/PorterDuff$Mode;->DST_ATOP:Landroid/graphics/PorterDuff$Mode;

    invoke-virtual {v1, p3, v2}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V

    .line 595
    :cond_0
    if-eqz p4, :cond_1

    .line 596
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedIconArea:Landroid/graphics/Rect;

    if-eqz v2, :cond_3

    .line 597
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedIconArea:Landroid/graphics/Rect;

    iget v2, v2, Landroid/graphics/Rect;->left:I

    int-to-float v2, v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedIconArea:Landroid/graphics/Rect;

    iget v3, v3, Landroid/graphics/Rect;->top:I

    int-to-float v3, v3

    invoke-virtual {v1, p4, v2, v3, v6}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 603
    :cond_1
    :goto_0
    invoke-virtual {p2, p1, v0}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 604
    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 606
    :cond_2
    return-void

    .line 599
    :cond_3
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v2, v2, Landroid/graphics/Rect;->left:I

    int-to-float v2, v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    iget v3, v3, Landroid/graphics/Rect;->top:I

    int-to-float v3, v3

    invoke-virtual {v1, p4, v2, v3, v6}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    goto :goto_0
.end method

.method public showClickedHighLightArea(Lcom/nemustech/tiffany/world/TFPanel;Lcom/nemustech/tiffany/world/TFPanel;Landroid/graphics/Rect;)V
    .locals 9
    .parameter "touchedPanel"
    .parameter "highLightPanel"
    .parameter "clickedArea"

    .prologue
    const/4 v8, 0x1

    const/high16 v7, 0x4000

    .line 656
    invoke-virtual {p1, v8}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v4

    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v5

    div-float/2addr v5, v7

    add-float v3, v4, v5

    .line 657
    .local v3, yPosTop:F
    iget-object v4, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v4, v4, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    iget v5, p3, Landroid/graphics/Rect;->top:I

    invoke-virtual {p3}, Landroid/graphics/Rect;->height()I

    move-result v6

    div-int/lit8 v6, v6, 0x2

    add-int/2addr v5, v6

    invoke-static {v4, v5}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v4

    sub-float v2, v3, v4

    .line 659
    .local v2, yPos:F
    const/4 v4, 0x0

    invoke-virtual {p1, v4}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v4

    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v5

    div-float/2addr v5, v7

    sub-float v1, v4, v5

    .line 660
    .local v1, xPosLeft:F
    iget-object v4, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v4, v4, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    iget v5, p3, Landroid/graphics/Rect;->left:I

    invoke-virtual {p3}, Landroid/graphics/Rect;->width()I

    move-result v6

    div-int/lit8 v6, v6, 0x2

    add-int/2addr v5, v6

    invoke-static {v4, v5}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v4

    add-float v0, v1, v4

    .line 662
    .local v0, xPos:F
    iget-object v4, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v4, v4, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    invoke-virtual {p3}, Landroid/graphics/Rect;->width()I

    move-result v5

    invoke-static {v4, v5}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v4

    iget-object v5, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v5, v5, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    invoke-virtual {p3}, Landroid/graphics/Rect;->height()I

    move-result v6

    invoke-static {v5, v6}, Lcom/nemustech/regina/RUtils;->convertTo3DSize(Landroid/content/Context;I)F

    move-result v5

    invoke-virtual {p2, v4, v5}, Lcom/nemustech/tiffany/world/TFPanel;->setSize(FF)V

    .line 664
    const/4 v4, 0x0

    invoke-virtual {p2, v0, v2, v4}, Lcom/nemustech/tiffany/world/TFPanel;->locate(FFF)V

    .line 665
    invoke-virtual {p2, v8}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 666
    return-void
.end method

.method public showClickedNext()V
    .locals 8

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    const/4 v5, 0x0

    const/high16 v4, 0x4000

    .line 632
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v2

    if-nez v2, :cond_0

    .line 633
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mMainHolder:Lcom/nemustech/regina/ElementReginaWidget$WidgetPlaceHolder;

    invoke-virtual {v2, v3}, Lcom/nemustech/tiffany/world/TFPanel;->attachTo(Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 634
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v5, v7, v7}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    .line 637
    :cond_0
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v3

    div-float/2addr v3, v4

    sub-float v1, v2, v3

    .line 638
    .local v1, posY:F
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v2

    div-float/2addr v2, v4

    add-float/2addr v1, v2

    .line 640
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v5}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v3

    div-float/2addr v3, v4

    add-float v0, v2, v3

    .line 641
    .local v0, posX:F
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v2

    div-float/2addr v2, v4

    div-float/2addr v2, v4

    sub-float/2addr v0, v2

    .line 642
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    const/4 v3, 0x0

    invoke-virtual {v2, v0, v1, v3}, Lcom/nemustech/tiffany/world/TFPanel;->locate(FFF)V

    .line 643
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 644
    return-void
.end method

.method public showClickedPrev()V
    .locals 8

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x1

    const/4 v5, 0x0

    const/high16 v4, 0x4000

    .line 609
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v2

    if-nez v2, :cond_0

    .line 610
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mMainHolder:Lcom/nemustech/regina/ElementReginaWidget$WidgetPlaceHolder;

    invoke-virtual {v2, v3}, Lcom/nemustech/tiffany/world/TFPanel;->attachTo(Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 611
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v5, v7, v7}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    .line 614
    :cond_0
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v3

    div-float/2addr v3, v4

    sub-float v1, v2, v3

    .line 615
    .local v1, posY:F
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v2

    div-float/2addr v2, v4

    add-float/2addr v1, v2

    .line 617
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v5}, Lcom/nemustech/tiffany/world/TFPanel;->getLocation(I)F

    move-result v2

    iget-object v3, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v3, v3, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v3

    div-float/2addr v3, v4

    sub-float v0, v2, v3

    .line 618
    .local v0, posX:F
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterItemPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v2

    div-float/2addr v2, v4

    div-float/2addr v2, v4

    add-float/2addr v0, v2

    .line 619
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    const/4 v3, 0x0

    invoke-virtual {v2, v0, v1, v3}, Lcom/nemustech/tiffany/world/TFPanel;->locate(FFF)V

    .line 620
    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v2, v2, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 621
    return-void
.end method

.method public showOriginGadget(ILcom/nemustech/tiffany/world/TFPanel;)V
    .locals 2
    .parameter "faceIndex"
    .parameter "panel"

    .prologue
    const/4 v1, 0x0

    .line 669
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    if-eqz v0, :cond_1

    .line 670
    invoke-virtual {p2, p1, v1, v1}, Lcom/nemustech/tiffany/world/TFPanel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 671
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V

    .line 673
    :cond_0
    iput-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mOriginBitmap:Landroid/graphics/Bitmap;

    .line 675
    :cond_1
    return-void
.end method

.method public showOriginNext()V
    .locals 2

    .prologue
    .line 647
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    if-nez v0, :cond_1

    .line 652
    :cond_0
    :goto_0
    return-void

    .line 648
    :cond_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 649
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0}, Lcom/nemustech/tiffany/world/TFPanel;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 650
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterNextHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v1}, Lcom/nemustech/tiffany/world/TFPanel;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFPanel;->detachFrom(Lcom/nemustech/tiffany/world/TFWorld;)V

    goto :goto_0
.end method

.method public showOriginPrev()V
    .locals 2

    .prologue
    .line 624
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    if-nez v0, :cond_1

    .line 629
    :cond_0
    :goto_0
    return-void

    .line 625
    :cond_1
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFPanel;->setVisibility(Z)V

    .line 626
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v0}, Lcom/nemustech/tiffany/world/TFPanel;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 627
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v0, v0, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mFrontCenterPrevHighLightPanel:Lcom/nemustech/tiffany/world/TFPanel;

    invoke-virtual {v1}, Lcom/nemustech/tiffany/world/TFPanel;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFPanel;->detachFrom(Lcom/nemustech/tiffany/world/TFWorld;)V

    goto :goto_0
.end method

.method public startActivityByGadget()V
    .locals 3

    .prologue
    .line 558
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    if-eqz v1, :cond_0

    .line 559
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    const/high16 v2, 0x1020

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 561
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mIntent:Landroid/content/Intent;

    invoke-virtual {v1, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 566
    :goto_0
    return-void

    .line 563
    :cond_0
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v2, 0x7f070007

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ResourceCare;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 564
    .local v0, msg:Ljava/lang/String;
    iget-object v1, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->this$0:Lcom/nemustech/regina/ElementReginaWidget;

    iget-object v1, v1, Lcom/nemustech/regina/ElementReginaWidget;->mContext:Landroid/content/Context;

    invoke-static {v1, v0}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    goto :goto_0
.end method

.method public touchedArea()Landroid/graphics/Rect;
    .locals 1

    .prologue
    .line 505
    iget-object v0, p0, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->mTouchedArea:Landroid/graphics/Rect;

    return-object v0
.end method
